package com.itheima.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("sun")
@Scope("singleton")
public class Sun {
    @Value("56461")
    private Integer radius;
    @Value("yellow")
    private String color;

    public Sun(Integer radius, String color) {
        this.radius = radius;
        this.color = color;
    }

    @Override
    public String toString() {
        return "Sun{" +
                "radius=" + radius +
                ", color='" + color + '\'' +
                '}';
    }

    public Sun() {
    }

    public Integer getRadius() {
        return radius;
    }

    public void setRadius(Integer radius) {
        this.radius = radius;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
}
